﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;

namespace EdgeStatz.ESSystems.Objects
{
    public class FormDefinition
    {
        private string name;
        private string folder;
        private string filePath;
        private string[] compileParameters;
        private string[] resources;
        /// <summary>
        /// Get or Set the name of the form definition.
        /// </summary>
        public string Name
        {
            get { return name; }
            set { name = value; }
        }
        /// <summary>
        /// Get or Set the folder of the form definition.
        /// </summary>
        public string Folder
        {
            get { return folder; }
            set { folder = value; }
        }
        /// <summary>
        /// Get or Set the file path of the form definition.
        /// </summary>
        public string FilePath
        {
            get { return filePath; }
            set { filePath = value; }
        }
        /// <summary>
        /// Get or Set the string array containing the compile parameters of the form definition.
        /// </summary>
        public string[] CompileParameters
        {
            get { return compileParameters; }
            set { compileParameters = value; }
        }
        public string[] Resources
        {
            get { return resources; }
            set { resources = value; }
        }

        public FormDefinition(string name, string folder)
        {
            if (name == null)
                throw new NullReferenceException("Form name cannot be null");
            if (folder == null)
                throw new NullReferenceException("Folder name cannot be null");

            this.name = name;
            this.folder = folder;
        }
        public FormDefinition(string name, string folder, string filepath)
            : this(name, folder)
        {
            this.filePath = filepath;
        }
        public FormDefinition(string name, string folder, string filepath, string[] compileparameters, string[] resources)
            : this(name, folder)
        {
            this.filePath = filepath;
            this.compileParameters = compileparameters;
            this.resources = resources;
        }
    }

    public class DisplayValueObject
    {
        private string display;
        private string value;
        public string Display
        {
            get { return display; }
            set { display = value; }
        }
        public string Value
        {
            get { return this.value; }
            set { this.value = value; }
        }
        public DisplayValueObject(string display, string value)
        {
            this.display = display;
            this.value = value;
        }
    }
}
